package org.maiyodemo.db;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.maiyodemo.entity.Cat;
import org.maiyodemo.entity.User;

/**
 * 模拟一个User表与Cat表的关系型数据库
 * 
 * @author maiYo
 * 
 */
public class MaiyoDemoDB {

	public static Map<User, List<Cat>> catDao = new HashMap<>();

	static {
		List<Cat> c1 = new ArrayList<Cat>();
		c1.add(new Cat(1, "Cat_ONE", "白色"));
		c1.add(new Cat(2, "Cat_TWO", "黄色"));
		catDao.put(new User(1, "maiyo", "123321", "沙坪坝"), c1);
		List<Cat> c2 = new ArrayList<Cat>();
		c2.add(new Cat(3, "Cat_THR", "红色"));
		c2.add(new Cat(4, "Cat_FOR", "黑色"));
		catDao.put(new User(2, "kenight", "123321", "渝中区"), c2);
	}

}
